home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>5</cardCount>
- <cardID>4894</cardID>
- <listID>4002</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>342</height>
- </cardSize>
- <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
- HyperCard Player Home Stack
- Version 2.3
-
- ©Copyright 1987-1995 by Apple Computer, Inc.
- All Rights Reserved.
-
- THE MESSAGE HANDLERS USED IN THIS SCRIPT:
- startUp,getHomeInfo,resume,nav,disallowInterruption,allowInterruption,
- setUserLevelFive,restoreUserLevel,checkForMissingFonts
-
- THE FUNCTION HANDLERS USED IN THIS SCRIPT:
- lastHCItem,checkHCFont
-
- XCMD'S USED BY THIS SCRIPT:
- FontExists XFCN
- Form: FontExists(<font name>,<point size>)
- It returns true if the font/point size is installed or false if not.
- ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
-
- ----- Startup/Resume Scripts: ---------------------------------------------
-
- on startUp
- -- Requires handler: getHomeInfo,checkForMissingFonts
- -- gets and sets the user's preferences
- checkForMissingFonts
- getHomeInfo
- -- audio Palette startup
- if there is a stack "Audio Help" then -- ∆
- start using stack "Audio Help" -- ∆
- send "startSound" to stack "Audio Help" -- ∆
- end if
- pass startUp -- so others can use it
- end startUp
-
- on getHomeInfo
- -- Needs: User preferences card of the home stack
- -- configures HyperCard to the user specified preferences
- global Stacks,Applications,Documents,UserName
- if short name of this stack is not "Home" then -- ∆
- lock screen
- set lockRecent to true
- set lockMessages to true
- push this card -- remember where we are
- go home -- will take us to the home stack in case we're not there
- put false into stackIsHome
- else put true into stackIsHome
- put (cd fld "User Name" of cd "User Preferences") into UserName
- set the userLevel to cd fld "User Level" of cd "User Preferences" -- hidden field
- set the powerKeys to hilite of cd btn id 3 of cd "User Preferences" -- Power Keys
- set the textArrows to hilite of cd btn id 2 of cd "User Preferences" -- Arrow keys in text
- -- load the search path globals
- put bg fld "Paths" of cd "Stacks" of bg "Paths" into Stacks
- put bg fld "Paths" of cd "Applications" of bg "Paths" into Applications
- put bg fld "Paths" of cd "Documents" of bg "Paths" into Documents
- if not stackIsHome then
- pop card -- return to where we were
- set lockRecent to false -- clean up for exit
- set lockMessages to false
- unlock screen
- end if
- end getHomeInfo
-
- on resume
- -- Requires handler: startUp
- -- runs startUp handler upon returning
- startUp
- pass resume -- so others can use it
- end resume
-
- ----- Utility Scripts --------------------------------------------
-
- on nav -- ∆ type "nav" into message box
- -- Requires XCMD: palette "Navigator"
- palette "Navigator"
- end nav
-
- on disallowInterruption -- so can't stop scripts while running
- set cantAbort of this stack to true
- end disallowInterruption
-
- on allowInterruption -- so can stop scripts while running
- set cantAbort of this stack to false
- end allowInterruption
-
- on setUserLevelFive -- some things need this userLevel
- global SvLvl
- put the userLevel into SvLvl
- set the userLevel to 5
- end setUserLevelFive
-
- on restoreUserLevel -- use after setUserLevelFive
- global SvLvl
- if SvLvl is a number then set the userLevel to SvLvl
- end restoreUserLevel
-
- function lastHCItem delim,theText
- -- returns the portion of <theText> that follows the last <delim>
- if delim is in theText then
- put lastHCItem(delim,char offset(delim,theText) + 1 to ¬
- length(theText) of theText) into theText
- end if
- return theText
- end lastHCItem
-
- ----- Font Adjustment Scripts: ----------------------------------
-
- on checkForMissingFonts
- -- Requires handler: checkHCFont
- -- check to see if the fonts needed for the stacks are
- -- installed in the system. Inform the user if they're not.
- get checkHCFont("Courier","9,12") & checkHCFont("Geneva","10,14") & ¬
- checkHCFont("Palatino","10,12,14,18,24") & ¬
- checkHCFont("Helvetica","18,24") -- these are fonts needed by this stack
- if it is empty then exit checkForMissingFonts
- else put it into missingFonts
- beep
- -- this dialog informs the user which fonts are missing
- answer "These font(s) are missing from your system:" & ¬
- return & return & missingFonts & return & ¬
- "For text to display correctly in the stacks, make sure you have" ¬
- && "installed the fonts included with HyperCard." -- ∆
- end checkForMissingFonts
-
- function checkHCFont theFont,pointSizes
- -- Requires XFCN: FontExists
- -- returns a list of font sizes needed but not in the system
- put empty into missing
- -- steps through each point size passed in
- repeat with count = 1 to the number of items in pointSizes
- put item count of pointSizes into theCurrentPtSize
- if not FontExists(theFont,theCurrentPtSize) -- if can't find it
- then put theCurrentPtSize & "," after missing
- end repeat
- if missing is not empty then
- put theFont & space before missing
- delete last char of missing
- put return after missing
- end if
- return missing
- end checkHCFont
- </script>
- <background id="2717" file="background_2717.xml" name="Home Cards" />
- <background id="5834" file="background_5834.xml" name="Preferences" />
- <background id="16078" file="background_16078.xml" name="Paths" />
- <card id="4894" file="card_4894.xml" marked="false" name="Welcome to..." owner="2717" />
- <card id="2376" file="card_2376.xml" marked="false" name="Stacks" owner="16078" />
- <card id="3517" file="card_3517.xml" marked="false" name="Applications" owner="16078" />
- <card id="3090" file="card_3090.xml" marked="false" name="Documents" owner="16078" />
- <card id="4594" file="card_4594.xml" marked="false" name="User Preferences" owner="5834" />
- </stack>
-